#ifndef __NODELIST_H__
#define __NODELIST_H__
#include <server_conf.h>

//nodeList节点数据结构
typedef struct nodeList_st
{
	int client_fd;
	int detect_fd;
	int epoll_fd;
	int pos;
	int recvDataLenth;
	void *recvDataBuff;
	long long lastUpdateTime;
	char client_id[IDSIZE];
	struct nodeList_st *prev;
	struct nodeList_st *next;
}T_nodeList,*PT_nodeList;

int nodeList_init(void);
int nodeList_addNode_unLock(int pos, int epollfd, int clientfd);
int nodeList_editNode_unLock(PT_nodeList me, char *client_id, char *detect_id);
int nodeList_delNode_unLock(int clientfd);
void nodeList_destroy(void);
int nodeList_updateTime(PT_nodeList me);
PT_nodeList findNode_fd_unLock(int fd);
PT_nodeList findNode_id_unLock(char *id);

extern PT_nodeList p_tNodeListHead;


#endif

